<template>
  <view class="h-empty-wrap">
    <image class="h-empty-img" v-if="icon" :src="icon"/>
    <view v-if="text">{{text}}</view>
    <slot></slot>
  </view>
</template>

<script>
export default {
  name: "hEmpty",
  props: {
    icon: {
      type: String,
      default: ''
    },
    text: {
      type: String,
      default: ''
    }
  }
}
</script>

<style>
.h-empty-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 28rpx;
  color: #838383;
}
.h-empty-img {
  width: 200rpx;
  height: 200rpx;
  object-fit: contain;
}
</style>
